package com.lightdz.tshirtdz.controller;

import com.lightdz.tshirtdz.bll.FrontPageBll;
import com.lightdz.tshirtdz.model.PageInfo;
import com.lightdz.tshirtdz.model.api.ApiFrontPage;
import com.lightdz.tshirtdz.model.api.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ Description：${description}
 * @ Author     ：zbl
 * @ Date       ：Created in 16:12 07/08/2018
 * @ Modified By：
 */

@RestController
@RequestMapping("/frontpage")
public class GetFrontPageController {

    @Autowired
    FrontPageBll frontPageBll;

    @GetMapping(value = "/getFrontPage")
    public ApiResponse<ApiFrontPage> getFrontPage(int pageSize, int pageNo){

        PageInfo pageInfo=new PageInfo(pageNo,pageSize,null);


        return frontPageBll.getFrontPage(pageInfo);
    }
}
